package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysMemberCarMapper;
import com.ruoyi.system.domain.SysMemberCar;
import com.ruoyi.system.service.ISysMemberCarService;

/**
 * 会员车牌Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-04-07
 */
@Service
public class SysMemberCarServiceImpl implements ISysMemberCarService 
{
    @Autowired
    private SysMemberCarMapper sysMemberCarMapper;

    /**
     * 查询会员车牌
     * 
     * @param id 会员车牌主键
     * @return 会员车牌
     */
    @Override
    public SysMemberCar selectSysMemberCarById(String id)
    {
        return sysMemberCarMapper.selectSysMemberCarById(id);
    }

    @Override
    public List<SysMemberCar> selectSysMemberCarByLicensePlate(String licensePlate) {
        return sysMemberCarMapper.selectSysMemberCarByLicensePlate(licensePlate);
    }

    /**
     * 查询会员车牌列表
     * 
     * @param sysMemberCar 会员车牌
     * @return 会员车牌
     */
    @Override
    public List<SysMemberCar> selectSysMemberCarList(SysMemberCar sysMemberCar)
    {
        return sysMemberCarMapper.selectSysMemberCarList(sysMemberCar);
    }

    /**
     * 新增会员车牌
     * 
     * @param sysMemberCar 会员车牌
     * @return 结果
     */
    @Override
    public int insertSysMemberCar(SysMemberCar sysMemberCar)
    {
        sysMemberCar.setCreateTime(DateUtils.getNowDate());
        return sysMemberCarMapper.insertSysMemberCar(sysMemberCar);
    }

    /**
     * 修改会员车牌
     * 
     * @param sysMemberCar 会员车牌
     * @return 结果
     */
    @Override
    public int updateSysMemberCar(SysMemberCar sysMemberCar)
    {
        sysMemberCar.setUpdateTime(DateUtils.getNowDate());
        return sysMemberCarMapper.updateSysMemberCar(sysMemberCar);
    }

    /**
     * 批量删除会员车牌
     * 
     * @param ids 需要删除的会员车牌主键
     * @return 结果
     */
    @Override
    public int deleteSysMemberCarByIds(String[] ids,String memberId)
    {
        return sysMemberCarMapper.deleteSysMemberCarByIds(ids,memberId);
    }

    /**
     * 删除会员车牌信息
     * 
     * @param id 会员车牌主键
     * @return 结果
     */
    @Override
    public int deleteSysMemberCarById(String id)
    {
        return sysMemberCarMapper.deleteSysMemberCarById(id);
    }
}
